package com.kly.service;

import com.fqgj.common.api.Response;
import com.kly.dto.*;
import com.kly.req.UserConsumeRequest;

import java.time.LocalDateTime;
import java.util.List;

public interface UserVasPurchasesService {

    Response<List<UserVasPurchasesDto>> getUserPurchasesBenefits(String userCode, Integer benefitCode);

    Response<List<UserVasPurchasesDto>> getAllUserBenefits(String userCode);

    Response<String> saveUserPurchasesBenefits(String userCode, ProductDto product);

    Response<String> reduceUserBenefits(ReduceBenefitsDto userBenefits);

    void addUserConsumptionRecord(ReduceBenefitsDto userBenefits);

    boolean getUnlock(String userCode,String chatUserCode,String imageCode);


    /**
     * 赠送权益次数
     * @param usageCount
     * @param userCode
     * @param benefitCode
     * @return
     */
    int updateUsageCount(int usageCount, String userCode, int benefitCode);



    int getUserConsumptionRecord(UserConsumeRequest request);


    /**
     * 读取ppv状态
     * @param userCode
     * @param chatUserCode
     * @param imageCode
     * @return
     */
    int getUnlockCount(String userCode, String chatUserCode, String imageCode);


    /**
     *
     * @param chatUserCode
     * @return
     */
    List<ConsumptionUserDto> unLockList(String chatUserCode);

    /**
     * 查询主播解锁数
     */
    Response<List<UserPCountDto>> getUserPCount(String chatterUserCode, String startDate, String endDate);


}
